/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gdatastructure;

/**
 *
 * @author ASUS
 */
public class car { //每条街道有来有会，有起点和终点代表了车辆的方向，可以深度计算
    private double x;
    private double y;
    private int streat;//汽车所在的街道索引号
    private double turnto;//车与街道末尾所距距离
    private double turnfrom;//车与街道初始所距距离
    public double length;//作为一个中间量，来测量车和人之间的距离。
    public int number;//代表该车辆在街道中n中的位置
    
    public car(){
        x=0;
        y=0;
        streat=0;
        turnto=0;
        turnfrom=0;
        length=0;
        number=-1;
    }
    
    public void showup(){
        int a,b;
        System.out.println("车辆的坐标为：("+x+","+y+"),车辆坐在的街道索引号为："+streat+"车牌号为XXXX,车型为XXXX.");
    }

    public car(int x, int y, int streat, double turnto, double turnfrom) {
        this.x = x;
        this.y = y;
        this.streat = streat;
        this.turnto = turnto;
        this.turnfrom = turnfrom;
    }

    public double getX() {
        return x;
    }

    public double getY() {
        return y;
    }

    public int getStreat() {
        return streat;
    }

    public double getTurnto() {
        return turnto;
    }

    public double getTurnfrom() {
        return turnfrom;
    }

    public double getLength() {
        return length;
    }

    public void setX(double x) {
        this.x = x;
    }

    public void setY(double y) {
        this.y = y;
    }

    public void setStreat(int streat) {
        this.streat = streat;
    }

    public void setTurnto(double turnto) {
        this.turnto = turnto;
    }

    public void setTurnfrom(double turnfrom) {
        this.turnfrom = turnfrom;
    }

    public void setLength(double length) {
        this.length = length;
    }
    
}
